<?php

class VideoMapper extends AbstractMapper
{

    protected function _init()
    {
	$this->setModel(new VideoModel());
	$this->setTableName(VIDEO_TABLE);
    }

    public function removeRelations($id)
    {
	if (!$id) {
	    return false;
	}
	$this->createSqlCommand()->delete('opinion_link_video', 'video = :video', array(':video' => $id));
	$this->createSqlCommand()->delete('review_link_video', 'video = :video', array(':video' => $id));
    }

}
